<?php
namespace app\index\controller;





use think\Controller;
use think\Request;
use Tools\Utf8ToPinyin;

class Index extends Controller
{
    public function test(){
        $time = strtotime('03:00');
        $date = date('Y-m-d H:i:s');
//        2018-12-05 03:10:34
//        $minute=floor((strtotime($enddate)-strtotime($startdate))%86400/60);
//        echo "相差分钟数：".$minute."分钟<br/><br/>";


//        $enddate = '2018-12-06 03:11:34';
//        $startdate = '03:00';
//        $minute=floor((strtotime($enddate)-strtotime($startdate))%86400/60);
//        if ($minute)
//        echo changDateToMinutes5('23:59');
//        echo "相差分钟数：".$minute."分钟<br/><br/>";
        $pinyin = new Utf8ToPinyin();
        echo  $pinyin->encode('夜间3点');



    }



    public function index(){
        $request = Request::instance();
        $this->redirect($request->domain().'/admin.php');
    }


}
